package com._119yn.host.gst200.service;

import com._119yn.host.gst200.database.entity.DeviceStatus;
import com._119yn.host.gst200.database.entity.HostSession;
import com._119yn.host.gst200.event.PointTableImportedEvent;
import com._119yn.host.gst200.model.Signal;

import java.util.List;

public interface HostService {

    void register(CanFrameSender sender);

    void refreshHostSession();

    void taskHostOfflineCheck();

    void onPointTableImportedEvent(PointTableImportedEvent event);

    HostSession getHostSessionByHostId(int hostId);

    HostSession getHostSessionByHostId(int hostId, boolean create);

    HostSession getHostSessionByDeviceId(String deviceId);

    HostSession getHostSessionByDeviceId(String deviceId, boolean create);

    void saveHostSessionByHostId(HostSession hostSession);

    void hostSilence(int host);

    void hostReset(int host);

    void hostManualForbid(int host);

    void hostManualPermit(int host);

    void hostAutoForbid(int host);

    void hostAutoPartial(int host);

    void hostAutoFull(int host);

    void hostSprayForbid(int host);

    void hostSprayPermit(int host);

    void hostGuardDisable(int host);

    void hostGuardEnable(int host);

    void deviceStartup(int host, int devCode, int devType);

    void deviceStartupStop(int host, int devCode, int devType);

    void deviceShield(int host, int devCode, int devType);

    void deviceShieldCancel(int host, int devCode, int devType);

    void active(HostSession hostSession, Signal signal);

    void deviceShield(String deviceId);

    void deviceShieldCancel(String deviceId);

    void deviceStartup(String deviceId);

    void deviceStartupStop(String deviceId);

    void saveDeviceStatus(DeviceStatus deviceStatus);

    void changeOnlineHostToSilence(Integer value);

    void changeOnlineHostStatuses(Long status, Integer manualSta, Integer autoSta, Integer spraySta, Integer guardSta);

    void cleanDeviceStatus();

    List<HostSession> getAllHostSessions();

    List<HostSession> getOnlineHostSessions();

    List<HostSession> getOfflineHostSessions();

    boolean isAllHostSessionOffline();

    DeviceStatus getDeviceStatusByDeviceId(String deviceId, boolean create);

    List<DeviceStatus> getAllDeviceStatus();
}
